<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="s" uri="/struts-tags" %>
    <% String path = request.getContextPath(); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加部门</title>
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>  
<script type="text/javascript" src="ckfinder/ckfinder.js"></script>
<script type="text/javascript" src="js/jquery-1.8.0.min.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#add").click(function(){
		$.post("<%=path%>/json/createUser",
				$("#userForm").serialize(),
				function(data){
					if(data.message == "success"){
						alert("添加成功");
					}
				},
				"json");
	});
});
</script>
</head>
<body>
<h1>添加部门信息</h1><hr />
 <textarea id="editor" name="content" cols="30" rows="4" ></textarea>
			<script type="text/javascript">
			var editor=CKEDITOR.replace('editor',{
					
			});
			</script>
<form id="userForm">
	<p>部门编号：<input type="text" name="uname" /></p>
	<p>部门名称：<input type="text" name="upassword" /></p>
	<p><input type="button" value="添加" id="add"/></p>
</form>
<a href="findUsers.action">显示部门信息</a>
</body>
</html>